package com.jml.mapper;

import com.jml.entity.JmlConfigInfoEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


public interface JmlConfigInfoMapper {
    @Select("SELECT * FROM jml_config_info WHERE config_id=#{configId};")
    List<JmlConfigInfoEntity> getByConfigId(Long configId);

    @Select("SELECT id as id,config_id as configId ,value as value  FROM jml_config_info WHERE id=#{id};")
    JmlConfigInfoEntity getById(Long id);

    @Update("update jml_config_info set value =#{value} where id=#{id}")
    int updateById(@Param("value") String value, @Param("id") Long id);
}
